<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta name="Author" content="benben" />
	<meta name="Description" content="Produces by JWI (http://www.51jsr.com)" />
	<meta name="keywords" content="JavaScript Framework,webUI,js,function,HTML,CSS,脚本" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Jsr.date 的封装演示 jsRookie - JavaScript UI module package</title>
	<link rel="shortcut icon" href="/favicon.ico" />
	<link href="../resources/example.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript" src="../jsr/jsr.core.js?skin=default&lang=zh-cn"></script>
</head>

<body>
<div id="bodyWrap" class="font">
	<b class="demoCaption">Jsr.date 的封装演示</b><hr/><br/>
	<table class="runWrap">
		<tr><td width="400px">
			a) 执行 <b class="blue">Jsr.now();</b>
		</td><td width="320px">
			结果：<span class="red">显示当前日期，Date型。</span>
		</td><td width="81px">
			<input type="button" value="查看结果" onclick="alert(Jsr.now().toLocaleString());"/>
		</td></tr>
		<tr><td>
			b) 执行 <b class="blue">Jsr.formatDate(new Date, "yyyy-MM-dd HH:mm:ss");</b>
		</td><td>
			结果：<span class="red">以 { yyyy-MM-dd HH:mm:ss } 样式显示当前时间。</span>
		</td><td>
			<input type="button" value="查看结果" onclick="alert(Jsr.formatDate(new Date, 'yyyy-MM-dd HH:mm:ss'));"/>
		</td></tr>
		<tr><td>
			c) 执行 <b class="blue">Jsr.getDateFrom(new Date, -10);</b>
		</td><td>
			结果：<span class="red">显示当前日期前十天的日期</span>
		</td><td>
			<input type="button" value="查看结果" onclick="alert(Jsr.getDateFrom(new Date, -10).toLocaleString());"/>
		</td></tr>
		<tr><td>
			d) 执行 <b class="blue">Jsr.getDaysOfMonth(new Date)</b>
		</td><td>
			结果：<span class="red">显示当前日期所在月的天数</span>
		</td><td>
			<input type="button" value="查看结果" onclick="alert(Jsr.getDaysOfMonth(new Date));"/>
		</td></tr>
		<tr><td>
			d) 执行 <b class="blue">Jsr.getDaysOfMonth(new Date(2010,1))</b>
		</td><td>
			结果：<span class="red">显示2010年2月有多少天</span>
		</td><td>
			<input type="button" value="查看结果" onclick="alert(Jsr.getDaysOfMonth(new Date(2010,1)));"/>
		</td></tr>
	</table>
	
	<br/><br/>
	<!--input type="button" value="清理内存" onclick="setTimeout(CollectGarbage, 10);"/-->
	<br/><br/>
	&copy 2008-2011 51jsr.com
</div>
</body>
</html> 